package com.hmall.api.client.fallback;

import com.hmall.api.client.CartClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;



// Cart项目请求的兜底
@Slf4j
public class CartClientFallbackFactory implements FallbackFactory<CartClient> {
    @Override
    public CartClient create(Throwable cause) {
        return ids -> {
            log.error("购物车删除失败",cause);
            throw new RuntimeException("cause");
        };
    }

}
